import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/home'
import login from '@/views/login'
import subjectMatter from'@/views/subject-matter/subject-matter'
import agent from '@/views/agent/agent'
import agencyCompany from'@/views/agency-company/agency-company'
import comment from '@/views/comment/comment'
import users from '@/views/users/users'
import schedule from'@/views/subject-matter/schedule'
import reply from'@/views/comment/reply'
import expert from'@/views/comment/expert'
import a404 from'@/views/404'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'',
      redirect:'home'
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '*',
      name: '404',
      component: a404
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children:[
        {
          path: '/subjectMatter',
          name: 'subjectMatter',
          component: subjectMatter
        },
        {
          path: '/agent',
          name: 'agent',
          component: agent
        },
        {
          path: '/agencyCompany',
          name: 'agencyCompany',
          component: agencyCompany
        },
        {
          path: '/comment',
          name: 'comment',
          component: comment
        },
        {
          path: '/users',
          name: 'users',
          component: users
        },
        {
          path: '/schedule',
          name: 'schedule',
          component: schedule
        },
        {
          path: '/reply',
          name: 'reply',
          component: reply
        },
        {
          path: '/expert',
          name: 'expert',
          component: expert
        },
      ]
    },


  ]
})
